#include<iostream>
#include<cmath>
#include<cstdio>
using namespace std;
int main()
{
	int t;
	cin >> t;
	while (t--) {
		int n;
		cin >> n;
		long long sum = 0, a = 0, b = 1;
		for (int i = 1; i < n; i++) {
			sum = a + b;
			a = b;
			b = sum;
		}
		cout << sum << endl;
	}
	return 0;
}